#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>

int main(void)
{
	int fd;
	int ret;
	fd = open("./test.txt",O_RDONLY);
	if(-1 == fd){
		printf("Open Error !\n");
		return 1;
	}
	printf("Open Successful !\n");
	
	char arr[20] ={'\0'};
	ret = read(fd,arr,20);
	if(-1 == ret){
		printf("read Errpr !\n");
		close(fd);
		return 1;
	}
	printf("%s %d",arr,ret);

	close(fd);
	
	return 0;
}


